package com.sunny.rpc.base.test;

import com.sunny.rpc.base.core.RpcFramework;
import com.sunny.rpc.base.service.HelloService;

/**
 * 消费者
 *
 * @author Sunny
 * @date 2019/6/7 14:27
 */
public class RpcConsumer {
    public static void main(String[] args) throws Exception {
        HelloService refer = RpcFramework.refer(HelloService.class, "127.0.0.1", 1111);

        for (int i = 0; i < 10; i++) {
            String result = refer.hello("Sunny" + i);
            System.out.println(result);
            Thread.sleep(500);
        }
    }
}
